package com.springsecurity.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "Estado", uniqueConstraints=@UniqueConstraint(columnNames="sg_uf"))
public class Uf implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue
	@Column(name = "id_cidade")
	private int id_uf;
	
	@Column(unique=true, nullable=false, length=02)
	private String sg_uf;
	
	@Transient
    private Pais pais;
	
	@Column(length=2)
    private String nm_uf;

    public int getId_uf() {
		return id_uf;
	}
	public void setId_uf(int id_uf) {
		this.id_uf = id_uf;
	}
	public String getSg_uf() {
		return sg_uf;
	}
	public void setSg_uf(String sg_uf) {
		this.sg_uf = sg_uf;
	}
	public Pais getPais() {
		return pais;
	}
	public void setPais(Pais pais) {
		this.pais = pais;
	}
	public String getNm_uf() {
		return nm_uf;
	}
	public void setNm_uf(String nm_uf) {
		this.nm_uf = nm_uf;
	}
    

}
